Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@nut-tree/nut-js
Advanced tools
GitHub Actions | |
---|---|
Master | |
Develop |
Please visit
for detailed documentation and tutorials
nut.js
is a cross-platform native UI automation / testing tool.
It allows for native UI interactions via keyboard and / or mouse, but additionally gives you the possibility to navigate the screen based on image matching.
nut.js
is developed with community in mind.
A huge "Thank you!" goes out to all sponsors who make open source a bit more sustainable!
Check out this demo video to get a first impression of what nut.js is capable of.
Please consult the project website at nutjs.dev for in-depth tutorials
nut-tree/trailmix contains a set of ready to use examples which demo the usage ot nut.js.
nut.js provides public API documentation auto-generated by TypeDoc.
Feel free to join our Discord community
This list gives an overview on currently implemented and planned functionality. It's work in progress and will undergo constant modification.
The following snippet shows a valid nut.js
example:
"use strict";
const { mouse, left, right, up, down, straightTo, centerOf, Region} = require("@nut-tree/nut-js");
const square = async () => {
await mouse.move(right(500));
await mouse.move(down(500));
await mouse.move(left(500));
await mouse.move(up(500));
};
(async () => {
await square();
await mouse.move(
straightTo(
centerOf(
new Region(100, 100, 200, 300)
)
)
);
})();
This section lists runtime requirements for nut.js
on the respective target platform.
In case you're running Windows 10 N and want to use ImageFinder plugins, please make sure to have the Media Feature Pack installed.
On macOS, Xcode command line tools are required. You can install them by running
xcode-select --install
Permissions:
nut.js requires the executing application, e.g. your terminal, to be given both Accessibility
and Screen Recording
permissions.
Starting with release 2.3.0
, nut.js will check for and request these permissions automatically:
It will also give you a subtle hint in case permissions are lacking:
##### WARNING! The application running this script is not a trusted process! Please visit https://github.com/nut-tree/nut.js#macos #####
##### WARNING! The application running this script is not allowed to capture screen content! Please visit https://github.com/nut-tree/nut.js#macos #####
Attention:
Prior to release 2.3.0
you'll have to grant these permissions manually.
Settings -> Security & Privacy -> Privacy tab -> Accessibility -> Add...
For example, if you want to execute your node script in e.g. iTerm2
, you'd have to add iTerm.app
to the list.
When running your script from a built-in terminal in e.g. VSCode
or IntelliJ
, you'd have to add the respective IDE.
Depending on your distribution, Linux setups may differ.
In general, nut.js
requires
Installation on *buntu
distributions:
sudo apt-get install libxtst-dev
Setups on other distributions might differ.
nut.js
Running
npm i @nut-tree/nut-js
or
yarn add @nut-tree/nut-js
will install nut.js
and its required dependencies.
nut.js
also provides snapshot releases which allows to test upcoming features.
Running
npm i @nut-tree/nut-js@next
or
yarn add @nut-tree/nut-js@next
will install the most recent development release of nut.js
.
Attention: While snapshot releases are great to work with upcoming features before a new stable release, it is still a snapshot release. Please bear in mind that things might change and / or break on snapshot releases, so it is not recommended using them in production.
FAQs
Native system automation for node.js
The npm package @nut-tree/nut-js receives a total of 0 weekly downloads. As such, @nut-tree/nut-js popularity was classified as not popular.
We found that @nut-tree/nut-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.